Repository navigation
Conversation
Clients compared Sepolia Amsterdam fork IDs by hand ahead of the fork and geth, reth and nethermind all advertise 0x6c1d9423. ethrex agrees: ForkId::new for the Sepolia preset returns 0x268956b6 with fork_next 1791294816 before activation, and 0x6c1d9423 with fork_next 0 from the activation timestamp onwards. sepolia_test_cases already covers the boundary, but it drives ForkId through is_valid, which can also accept a remote hash by the EIP-2124 subset and superset rules; it therefore does not pin the value we put on the wire. Assert the advertised fork hash and fork_next directly, so a change that altered them fails here instead of partitioning us from the network. No production change.
|
🤖 Kimi Code ReviewI'll review this PR diff focusing on the aspects you mentioned. Review: Fork ID Test for Sepolia Amsterdam BoundaryOverall AssessmentThis is a well-crafted regression test that pins critical network behavior. The code is largely correct and follows good practices, but I have several observations. Specific Findings1. Potential Test Fragility: Hardcoded Block Number
|
🤖 Claude Code ReviewThis is a small, well-scoped test-only PR. Overall it's clean and does what it says. A few minor notes: Findings
No correctness, security, or performance concerns — this is a test-only addition that improves regression coverage for a real (and previously noted, non-obvious) gap. Automated review by Claude (Anthropic) · sonnet · custom prompt |
🤖 Codex Code ReviewNo findings. The PR is test-only in crates/common/types/fork_id.rs, and the added No security, consensus, gas-accounting, or performance concerns from this diff. I could not execute the test in this environment because Automated review by OpenAI Codex · gpt-5.4 · custom prompt |
Lines of code reportTotal lines added: Detailed view |
Motivation
Following #7287, clients have been comparing their Sepolia Amsterdam fork IDs by hand ahead of the fork. geth, reth and nethermind all advertise
0x6c1d9423.ethrex agrees. Printing what
ForkId::newreturns for the Sepolia preset:So we match on both sides of the boundary: BPO2 stays the head fork until activation while announcing Amsterdam as
fork_next, and from activation on Amsterdam is the head fork with nothing following.Description
sepolia_test_casesalready covers this boundary, but it drivesForkIdthroughis_valid, which can also accept a remote hash by the EIP-2124 subset and superset rules (#2/#3) rather than by the direct hash comparison in rule #1. In the Amsterdam rows it does take rule #1, so the coverage is real — but the test does not pin the value, and a future change could keep it passing through a different rule while altering what we actually put on the wire.This adds a test that asserts the advertised
fork_hashandfork_nextdirectly. No production change; the schedule itself landed in #7287.Getting this wrong does not produce a wrong block, it partitions us: peers reject the handshake on fork-ID mismatch, so the failure looks like "no peers" rather than a test failure. That is worth a direct assertion.
How to Test
cargo test -p ethrex-common --lib fork_id9 passed, including the new
sepolia_advertises_amsterdam_fork_idand the unchangedsepolia_test_casesandhoodi_test_cases.Notes for reviewers
cargo clippy -p ethrex-common --all-targets -- -D warningsalready fails onmainwithneedless_returnatcrates/common/crypto/kzg.rs:289, in the non-c-kzgbody ofverify_cell_kzg_proof_batch_partial. It is another branch that nothing builds, so nothing lints it either. Not touched here.Checklist
STORE_SCHEMA_VERSION(crates/storage/lib.rs) if the PR includes breaking changes to theStorerequiring a re-sync. (Not needed: test only.)